package com.numbfish.ch02_ex01_aop.config;

import com.numbfish.ch02_ex01_aop.aop.AnnotationAspect;
import com.numbfish.ch02_ex01_aop.aop.MyAspect;
import com.numbfish.ch02_ex01_aop.service.MyCalculator;
import com.numbfish.ch02_ex01_aop.service.MyCalculatorAnnotation;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@Configuration
@EnableAspectJAutoProxy
public class CustomConfigAnnotation {
    @Bean
   public AnnotationAspect annotationAspect(){
        return new AnnotationAspect();
    }

    @Bean
    public MyCalculatorAnnotation myCalculatorAnnotation(){
        return new MyCalculatorAnnotation();
    }
}
